/*
 
 */
package com.jme3.gde.gui.extra.xam.model.impl;

import com.jme3.gde.gui.extra.xam.model.NiftyAttribute;
import com.jme3.gde.gui.extra.xam.model.ElementTypeImpl;
import org.w3c.dom.Element;
import com.jme3.gde.gui.extra.xam.model.ElementType;
import com.jme3.gde.gui.extra.xam.model.LayoutType;
import com.jme3.gde.gui.extra.xam.model.NiftyModel;
import com.jme3.gde.gui.extra.xam.model.NiftyQName;
import com.jme3.gde.gui.extra.xam.model.TextType;
import com.jme3.gde.gui.extra.xam.model.visitor.NiftyComponentVisitor;	

/**
 * Implementation for domain component textType.
 * 
 * @author cuongnguyen
 */
// Generated by XAM AutoGen Tool v0.2
public class TextTypeImpl extends ElementTypeImpl implements TextType {

    public TextTypeImpl(NiftyModel model, Element element) {
        super(model, element);
    }
    
    public TextTypeImpl(NiftyModel model) {
        this(model, createElementNS(model, NiftyQName.TEXTTYPE));
    }

    // attributes

    public String getText() {
        return getAttribute(NiftyAttribute.TEXT);
    }

    public void setText(String text) {
        setAttribute(TEXT_PROPERTY, NiftyAttribute.TEXT, text);
    }

    public LayoutType getLayout() {
        return LayoutType.getLayoutType(getAttribute(NiftyAttribute.LAYOUT));
    }

    public void setLayout(LayoutType layout) {
        setAttribute(LAYOUT_PROPERTY, NiftyAttribute.LAYOUT, layout.getValue());
    }

    public String getFont() {
        return getAttribute(NiftyAttribute.FONT);
    }

    public void setFont(String font) {
        setAttribute(FONT_PROPERTY, NiftyAttribute.FONT, font);
    }

    public String getColor() {
        return getAttribute(NiftyAttribute.COLOR);
    }

    public void setColor(String color) {
        setAttribute(COLOR_PROPERTY, NiftyAttribute.COLOR, color);
    }

    // child elements

    public void accept(NiftyComponentVisitor visitor) {
        visitor.visit(this);
    }

}